<?php
    $cli = new swoole_client(SWOOLE_SOCK_UDP);
    if(!$cli->connect("127.0.0.1",9502)){
        die('connect Udp server failed !');
        exit;
    }
    fwrite(STDOUT,"Please Input The Message :");
    $msg = fgets(STDIN);
    $cli->send($msg);
    $res = $cli->recv();
    echo $res."\n";